<div class="row animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="col-xs-12 col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <a ng-click="discard()" href="javascript:;"><i class="backBtn fa fa-arrow-circle-left"></i></a>
        <span class="panelTitle" ng-bind="UserForm.title"></span>
      </div>
      <div class="panel-body">
        <form novalidate method="post" role="form" name="userForm" class="form-horizontal" ng-submit="changePwd(user)">
          <div class="form-group" ng-class="{'has-error': userForm.oldpassword.$invalid && userForm.oldpassword.$dirty}">
            <label class="col-xs-3 col-md-2 control-label">旧密码：</label>
            <div class="col-xs-5 col-md-4">
              <input type="password" name="oldpassword" id="oldpassword" class="form-control" placeholder="旧密码" ng-model="user.oldpassword" required>
            </div>
            <div class="col-xs-4 col-md-6" ng-show="userForm.oldpassword.$dirty && userForm.oldpassword.$invalid">
              <span class="text-danger" ng-show="userForm.oldpassword.$error.required">旧密码不能为空</span>
            </div>
          </div>
          <div class="form-group" ng-class="{'has-error': userForm.password.$invalid && userForm.password.$dirty}">
            <label class="col-xs-3 col-md-2 control-label">用户密码：</label>
            <div class="col-xs-5 col-md-4">
              <input type="password" name="password" id="password" class="form-control" placeholder="用户密码" ng-model="user.password" required>
            </div>
            <div class="col-xs-4 col-md-6" ng-show="userForm.password.$dirty && userForm.password.$invalid">
              <span class="text-danger" ng-show="userForm.password.$error.required">用户密码不能为空</span>
            </div>
          </div>
          <div class="form-group" ng-class="{'has-error': userForm.repassword.$invalid && userForm.repassword.$dirty}">
            <label class="col-xs-3 col-md-2 control-label">确认密码：</label>
            <div class="col-xs-5 col-md-4">
              <input type="password" name="repassword" pw-check="password" class="form-control" placeholder="确认密码" ng-model="user.repassword" required>
            </div>
            <div class="col-xs-4 col-md-6" ng-show="userForm.repassword.$dirty && userForm.repassword.$invalid">
              <span class="text-danger" ng-show="userForm.repassword.$error.pwmatch">两次输入密码不一致</span>
            </div>
          </div>
          <div class="col-xs-offset-2 col-md-offset-2 col-xs-offset-10 col-md-offset-10">
            <button class="btn btn-primary" type="submit" ng-click="submitForm()"  ng-disabled="userForm.$invalid">保存</button>&nbsp;&nbsp;<span class="text-danger" ng-if="UserForm.error" ng-bind="UserForm.error"></span>
          </div>
        </form>
      </div>
    </div>    
  </div>
</div>